package min.chapter.three5;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class InjectionObjectAcquisition {
	public static void main(String[] args){
		ApplicationContext context = new FileSystemXmlApplicationContext("src/min/chapter/three5/BeanOptional.xml");
		BeanOptionalService service1 = (BeanOptionalService) context.getBean("service");
		BeanOptionalService service2 = (BeanOptionalService) context.getBean("service");

		System.out.println("service1 : " + service1);
		System.out.println("service2 : " + service2);
		service1.serviceSed();
	}
}